-- GENERATED SPELL FOR [Ghoul Tormentor] --


function spell0_26621(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(51917,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26621', 576, 1)
end

function spell1_26621(pUnit, Event) --@Flesh Rot,n/a--
pUnit:FullCastSpellOnTarget(49678,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26621', 8000, 1)
end

function spell2_26621(pUnit, Event) --@Flesh Rot,n/a--
pUnit:FullCastSpellOnTarget(59007,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26621', 8000, 1)
end

function Sorts_26621(pUnit, Event)
local choix_sorts_26621 = math.random(0, 2)
if choix_sorts_26621 == 0 then
pUnit:RegisterEvent('spell0_26621', 1, 1)
end
if choix_sorts_26621 == 1 then
pUnit:RegisterEvent('spell1_26621', 1, 1)
end
if choix_sorts_26621 == 2 then
pUnit:RegisterEvent('spell2_26621', 1, 1)
end
end

function mob26621_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26621', math.random(1500, 3000), 1)
end

function mob26621_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26621_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26621_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26621, 1, 'mob26621_Action')
RegisterUnitEvent(26621, 2, 'mob26621_Leave')
RegisterUnitEvent(26621, 3, 'mob26621_Kill')
RegisterUnitEvent(26621, 4, 'mob26621_Die')
